package co.fitstart.admin.service;

import java.util.List;

import com.demo2do.core.support.Page;

import co.fitstart.admin.entity.search.DistributorSearch;
import co.fitstart.entity.user.distributor.DistributionRecord;
import co.fitstart.entity.user.distributor.Distributor;
import co.fitstart.entity.user.distributor.DistributorUserRelation;

public interface DistributorService {
    
    /**
     * 
     * @param page
     * @return
     */
    public List<Distributor> list(Page page);
    
    /**
     * 
     * @param page
     * @return
     */
    public List<Distributor> list();
    
    
    /**
     * 
     * @param search
     * @param page
     * @return
     */
    public List<Distributor> search(DistributorSearch search, Page page);
    
    /**
     * 
     * @param userId
     * @return
     */
    public Distributor loadByUserId(Long userId);
    
    /**
     * 
     * @param id
     * @return
     */
    public Distributor load(Long id);
    
    /**
     * 
     * @param distributor
     */
    public void editDistributor(Distributor distributor);
    
    /**
     * 
     * @param distributor
     */
    public void createDistributor(Distributor distributor);
    
    /**
     * 
     * @param distributor
     */
    public void deleteDistributor(Distributor distributor);
    
    /**
     * 
     * @param distributor
     * @return
     */
    public List<DistributorUserRelation> listRelation(Distributor distributor);
    
    /**
     * 
     * @param distributor
     * @param distributionRecord
     */
    public void payDistribution(Distributor distributor, DistributionRecord distributionRecord);
}
